<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>js数据类型</title>
    <script type="text/javascript" src="../tool.js"></script>
</head>
<body>
<script type="text/javascript">
    /*
    * typeof
    * instanceof
    * Object.prototype.toString
    * constructor
    * duck type
    *
    *
    * 注意
    * typeof null === "object"
    *
    * */

    function arraysSimilar(arr1) {
        return typeof arr1
    }

    Ulog.w(arraysSimilar([1, 2]));//object
    Ulog.w(arraysSimilar(3));//number
    Ulog.w(arraysSimilar("fjkld"));//string


</script>
</body>
</html>










